/*
 *  TechReport.cpp
 *  TechReport
 *
 *  Created by Hamza SHAWY on 20/10/07.
 *  Copyright 2007 __MyCompanyName__. All rights reserved.
 *
 */

#include "TechReport.h"
#include "TechReport.h"

 #include <iostream>
 #include <iomanip>
 
 using std::cout;
 using std::endl;



/* Definition of the default constructor  "TechReport" of the class "TechReport" */ 
    TechReport::TechReport( ) : Report (), Url ("< undefined yet >")
	{} // end TechReport default constructor

/* Definition of the regular constructor  "TechReport"  */     
	TechReport::TechReport(int id, int year, string author, string title, string inst, string dep, string url ) : Report (-1, -1, inst, dep,"< undefined yet >","< undefined yet >" ), Url (url) 
	{}// end TechReport regular constructor
															  
/*  Definition of the dedstructor  "~TechReport" of the class "TechReport"  */ 
    TechReport::~TechReport()    
	{} // end TechReport destructor	 

/*  Definition of the method "getUrl" of the class "TechReport"  */    
    string TechReport::getUrl() const
	  {
        return Url ; // returns the url of the technical report
	  } // end function getUrl
	  
/*  Definition of the method "getNumberOfPages" of the class "TechReport"  */    
    int TechReport::getNumberOfPages() const
	  {
        return 1 ; // returns always one
	  } // end function getNumberOfPages
	  			  	  	  
	  
/*  Definition of the method "print" of the class "TechReport"	*/																																																																								  
	void TechReport::print()  //prints a string representation of this report consisting of the departmentand the institution concerned 
	  {
        Reference :: print(); //  This member function overrides the one defined in the class TechReport.
		cout << "         * The Technical TechReport is also specified by its : "<< endl;
		cout <<  "						5) Uniform Resource Locator (Url) which is : "<< getUrl()<<endl;
		cout <<  "						6) Number of pages which is : "<< getNumberOfPages() << " (only one page because it is a technical report as described in the PDF) "<<endl;
	  } // end function print	 

	
/*  Definition of the member function "setIUrl" of the class "TechReport" */     
    void TechReport::setUrl( string url  )  // Sets the technical report's url                
    {                                                           
       Url = url ;                     
	} // end function setUrl
		

	
